Optimizing the rendering of layouts
Calculating a layout for a node or a sub-tree in the scene graph can be a computationally intensive task. In general, any movement in any node of, for example, a Grid Layout node, causes recalculation of the layout, which in turn slows down framebuffer updating.
To optimize the rendering of layouts you have to reduce the number of calls to the kzuObjectNodeInvalidateLayout
, which causes the recalculation of the layout for the next frame:
- Use the Render Transformation property instead of the Layout Transformation property whenever possible. Render transformations can significantly decrease the amount of recalculations in a layout with many child nodes. See Using render transformations.
Viewing the animation and layout performance
To view the animation and layout performance of your application:
Using render transformations
Because render transformations do not recalculate a layout, use render transformations instead of other transformations.
To use render transformations:
- In the Preview enter the Edit mode.
- Select the Node tool and set the transformation tool to use the Render Transformation ().
- Use the Node tool to move, rotate, or scale the node in the Preview. See Editing your application in the Preview.
or
- In the select the node to which you want to apply a transformation.
- In the Properties click , and add the Render Transformation property.
- Use the Render Transformation property to apply the transformation for the node you selected in the first step.
See also
Rendering best practices
Setting nodes for efficient rendering
Preventing overdraw with the Sorting Filter
Rendering static content
Rendering transparent nodes
Measuring the performance of your application
Best practices
Open topic with navigation